package p532.p1.interfaces;

import acm.program.GraphicsProgram;
import p532.p1.implementations.Ball;
import p532.p1.implementations.Paddle;

/**
 *
 * @author han
 */
public abstract class abGameBoard extends GraphicsProgram {

    public final static int GAME_STATE_STARTED = 1;
    public final static int GAME_STATE_STOPPED = 2;
    public final static int GAME_STATE_PREPARE = 3;
    public final static int GAME_FRAME_FREQUENCY = 25;//in milliseconds
    private int currentGameState = 0;
    private Ball gameBall = null;
    private Paddle gamePaddle = null;
    //private Brick gameBrick = null;

    
    
    //public Brick getGameBrick() {

    //    return gameBrick;
	//}

	
    
    
    //public void setGameBrick(Brick gameBrick) {
	
	//this.gameBrick = gameBrick;}
    
    
    public Ball getGameBall() {
        return gameBall;
    }

    public void setGameBall(Ball gameBall) {
        this.gameBall = gameBall;
    }

    public Paddle getGamePaddle() {
        return gamePaddle;
    }

    public void setGamePaddle(Paddle gamePaddle) {
        this.gamePaddle = gamePaddle;
    }

    public synchronized int getCurrentGameState() {
        return currentGameState;
    }

    public synchronized void setCurrentGameState(int currentGameState) {
        this.currentGameState = currentGameState;
    }

    /**
     * Initialize the game application environment.
     */
    public abstract void initialize();

    /**
     * Initialize all the game objects/images.
     */
    public abstract void initGame();

    /**
     * Start the game.
     */
    public abstract void startGame();

    /**
     * Pause the game.
     */
    public abstract void pauseGame();

    /**
     * Resume the game from paused.
     */
    public abstract void resumeGame();

    /**
     *
     */
    public abstract void clearGame();

    /**
     * Add a game object to this game board.
     *
     * @param objects
     */
    public abstract void addGameObjects(iGameObject[] objects);

    /**
     * Display game information.
     */
    public abstract void displayInfo();

    /**
     * Display play's status.
     */
    public abstract void displayStatus();

    /**
     * Check any collision happenning in the current frame/game state.
     */
    public abstract void checkCollision();

    /**
     * Remove a game object from this game board.
     *
     * @param object
     */
    public abstract void removeGameObject(iGameObject object);

    /**
     *
     */
    public abstract Boolean moveAllObjects();
}
